home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / tcclib.zip / DEMO.C next >
Text File  |  1989-02-11  |  983b  |  47 lines

  1. #include <conio.h>
  2. #include <process.h>
  3. #include "tcclib.h"
  4.  
  5. void ScanTreeDemo( void );
  6. void GetFileDemo( void );
  7. void GetFieldDemo( void );
  8. void WindowListerDemo( void );
  9.  
  10. /* GLOBAL VARIABLES NEEDED FOR THE LIBRARY */
  11. unsigned char attrib    = 0x07;
  12. unsigned char A_REVERSE = 0x70;
  13. unsigned char A_NORMAL  = 0x07;
  14.  
  15. void main()
  16. {
  17.     for (;;) {
  18.         clrscr();
  19.         ExplodeBox( 20, 6, 60, 20 );
  20.         Center(  8, "F1 - ScanTree Demonstration" );
  21.         Center( 10, "F2 - WindowLister Demonstration" );
  22.         Center( 12, "F3 - GetFile Demonstration" );
  23.         Center( 14, "F4 - GetField Demonstration" );
  24.         Center( 16, "F5 - Quit" );
  25.         AtSay( 25, 18, "Your Choice : " );
  26.         HideCursor();
  27.         switch( GComm() ) {
  28.             case F1:
  29.                 ScanTreeDemo();
  30.                 break;
  31.             case F2:
  32.                 WindowListerDemo();
  33.                 break;
  34.             case F3:
  35.                 GetFileDemo();
  36.                 break;
  37.             case F4:
  38.                 GetFieldDemo();
  39.                 break;
  40.             case F5:
  41.             case ESC:
  42.                 exit(0);
  43.         }
  44.     }
  45. }
  46.  
  47.